// v-power 控制权限
import store from '@/store/index'
const powerList = store.getters["menu/GETPOWERLIST"];
export default {
  install: function (app) {
    // 权限控制
    app.directive('power', {
      mounted (el, binding) {
        if (powerList && powerList.length) {
          if (!powerList.includes(binding.value)) {
            el.className += ' is-disabled'
          }
        }
      }
    })
  }
}
